package com.shuoyue.ycgk.ui.mok;

import androidx.annotation.Nullable;

import com.bumptech.glide.Glide;
import com.chad.library.adapter.base.BaseViewHolder;
import com.shuoyue.ycgk.R;
import com.shuoyue.ycgk.base.baseadapter.AppBaseQuickAdapter;
import com.shuoyue.ycgk.entity.MokType;
import com.shuoyue.ycgk.utils.GlideUtil;

import java.util.List;

public class MokTypeAdapter extends AppBaseQuickAdapter<MokType> {
    public MokTypeAdapter(@Nullable List<MokType> data) {
        super(R.layout.item_mok_type, data);
    }

    @Override
    protected void convert(BaseViewHolder helper, MokType item) {
        helper.setText(R.id.title, item.getSubjectTypeName());
        GlideUtil.loadImage(mContext, item.getCover(), helper.getView(R.id.img));
        helper.setText(R.id.num, String.valueOf(item.getTotalMock()));
        helper.addOnClickListener(R.id.lay_all);
    }
}
